package com.nibianplus.util;

import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;

public class AppUtil {
	/**
	 * ��ȡӦ�ó�������
	 * @return
	 */
	public static String getAppName(){
		try {
			PackageManager packageManager = ContextUtil.getContext()
					.getPackageManager();
			PackageInfo packageInfo = packageManager.getPackageInfo(ContextUtil.getContext().getPackageName(), 0);
			int labelRes = packageInfo.applicationInfo.labelRes;
			return ContextUtil.getContext().getResources().getString(labelRes);
		} catch (NameNotFoundException e) {
			e.printStackTrace();
		}
		return null;
	}
}
